home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(pauseTimeout < getTimer())
- {
- if(_root.paused != true && Key.isDown(80))
- {
- sndWhip.start(0,0);
- _parent.cocoFuel.stop();
- _root.sndThrusters.stop();
- _parent.mcPaused.gotoAndPlay("paused");
- this.fumeDown.gotoAndStop("off");
- this.fumeLeft.gotoAndStop("off");
- this.fumeRight.gotoAndStop("off");
- _root.paused = true;
- pauseTimeout = getTimer() + 500;
- }
- else if(_root.paused && (Key.isDown(80) or Key.isDown(Key.UP) or Key.isDown(Key.RIGHT) or Key.isDown(Key.LEFT)))
- {
- sndWhip.start(0,0);
- _parent.mcPaused.gotoAndPlay("out");
- _root.paused = false;
- pauseTimeout = getTimer() + 500;
- }
- }
- if(_root.paused != true)
- {
- if(_root.landed != true)
- {
- if(_root.outOfFuel != true)
- {
- if(Key.isDown(Key.UP))
- {
- gravity -= gravityFactor * thrusterPower;
- if(this.fumeDown.fumeOn != true)
- {
- this.fumeDown.gotoAndPlay("on");
- _parent.monkeyShip.rightArm.gotoAndPlay("push");
- }
- }
- else
- {
- this.fumeDown.gotoAndPlay("off");
- _parent.monkeyShip.rightArm.gotoAndPlay("idle");
- }
- if(Key.isDown(Key.RIGHT))
- {
- xMovement += thrusterPower / 15;
- if(this.fumeLeft.fumeOn != true)
- {
- this.fumeLeft.gotoAndPlay("on");
- _parent.monkeyShip.leftArm.gotoAndPlay("right");
- }
- }
- else
- {
- this.fumeLeft.gotoAndPlay("off");
- }
- if(Key.isDown(Key.LEFT))
- {
- xMovement -= thrusterPower / 15;
- _root.cocoFuel.Play();
- if(this.fumeRight.fumeOn != true)
- {
- this.fumeRight.gotoAndPlay("on");
- _parent.monkeyShip.leftArm.gotoAndPlay("left");
- }
- }
- else
- {
- this.fumeRight.gotoAndPlay("off");
- }
- if(Key.isDown(Key.LEFT) == false and Key.isDown(Key.RIGHT) == false)
- {
- _root.cocoFuel.Stop();
- _parent.monkeyShip.leftArm.gotoAndPlay("idle");
- }
- if(Key.isDown(Key.LEFT) == false and Key.isDown(Key.RIGHT) == false and Key.isDown(Key.UP) == false)
- {
- _root.sndThrusters.stop();
- sndThrustersStarted = false;
- _root.cocoFuel.Stop();
- this.fumeDown.gotoAndPlay("off");
- this.fumeLeft.gotoAndPlay("off");
- this.fumeRight.gotoAndPlay("off");
- }
- else
- {
- if(sndThrustersStarted != true)
- {
- sndThrustersStarted = true;
- _root.sndThrusters.start(0,999);
- }
- _root.cocoFuel.Play();
- _root.sndThrustersPlaying = true;
- }
- }
- else
- {
- _root.sndThrusters.stop();
- this.fumeDown.gotoAndStop("off");
- this.fumeLeft.gotoAndStop("off");
- this.fumeRight.gotoAndStop("off");
- _root.cocoFuel.Stop();
- }
- gravity += gravityFactor;
- this._y += gravity;
- this._x += xMovement;
- this._rotation = xMovement;
- }
- }
- }
-